<?php
/*
 *
 * @package MoltX
 * @author $Author$
 * @version $Id$
 * @link $URL$
 * @copyright Copyright (c) 2005-2010, Matthew Oltendorf
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 *
 */

// Set error reporting.
error_reporting ( E_ALL | E_STRICT );

// Set the environment.
define ( 'blink', true );
define ( 'blink_application', __FILE__ );
define ( 'blink_directory', realpath ( dirname ( __FILE__ ) ) );
define ( 'blink_static', realpath ( blink_directory . '/static' ) );
define ( 'blink_storage', realpath ( blink_directory . '/storage' ) );
define ( 'blink_system', realpath ( blink_directory . '/system' ) );

// Include common files.
include blink_system . '/common.php';
include blink_directory . '/configuration.php';

// Ensure that we are using Blink's error handler, and exception handler.
blink :: errors ( true );

// Command line or Apache module?
if ( ! isset ( $argv ) )
{
	// Launch Blink!
	blink :: initiate ( );
}
else
{
	// Launch Blink!
	blink :: initiate ( $argv );
}

// Disable Blink's error handler, and exception handler.
blink :: errors ( false );
